class Goods:
    def __init__(self, Num, Name , Price, Count):
        self.num = Num
        self.name = Name
        self.price = Price
        self.count = Count

    def TotalPrice(self):
        totalPrice = self.count*self.price
        print("商品的总金额是：", totalPrice)


num = input("请输入商品编号:")
name = input("请输入商品名称:")
price = eval(input("请输入商品的价钱:"))
count = eval(input("请输入商品的数量:"))
g = Goods(num, name, price, count)
g.TotalPrice()

